﻿<phone:PhoneApplicationPage 
    x:Class="YiDingCanWp7.ShopList"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:local="clr-namespace:YiDingCanWp7"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource CustomPhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="False" Loaded="PhoneApplicationPage_Loaded">
    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <phone:PhoneApplicationPage.Resources>
    </phone:PhoneApplicationPage.Resources>
    <Grid x:Name="LayoutRoot">
    	<Grid.Background>
<ImageBrush ImageSource="PanoramaBackground.png" Stretch="UniformToFill" />
        </Grid.Background>
        <Grid.Resources>
            <DataTemplate x:Name="PickerItemTemplate">
                <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding name}" FontSize="25" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                </StackPanel>
            </DataTemplate>
            <DataTemplate x:Name="PickerFullModeItemTemplate">
                <StackPanel Orientation="Horizontal" Margin="16 21 0 20">
                    <TextBlock Text="{Binding name}" Margin="16 0 0 0" FontSize="25" FontFamily="{StaticResource PhoneFontFamilyLight}"/>
                </StackPanel>
            </DataTemplate>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="20*"/>
            <RowDefinition Height="80*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,2,0,5" Height="90" VerticalAlignment="Top">
            <!--<TextBlock x:Name="ApplicationTitle" Foreground="Black" Text="{StaticResource ApplicationName}" Style="{StaticResource PhoneTextNormalStyle}"/>-->
            <TextBlock x:Name="PageTitle" Text="附近" Margin="9,1,0,0" Style="{StaticResource CustomPhoneTextTitleStyle}" Height="60" Width="467" FontSize="50" />
            <toolkit:PerformanceProgressBar x:Name="performanceProgressBar"  Foreground="Red" Background="Red" IsIndeterminate="True"/>
        </StackPanel>

        <toolkit:ListPicker Header="" ExpansionMode="FullScreenOnly" FullModeItemTemplate="{StaticResource PickerFullModeItemTemplate}" ItemTemplate="{StaticResource PickerItemTemplate}"
                                x:Name="listBox_distance" Margin="49,73,0,0" Height="64" Width="180" BorderThickness="1,1,1,1" VerticalAlignment="Top"   HorizontalAlignment="Left" FontSize="50" BorderBrush="#BFEE1111" />
        <toolkit:ListPicker Header="" ExpansionMode="FullScreenOnly" FullModeItemTemplate="{StaticResource PickerFullModeItemTemplate}"  BorderBrush="#BFEE1111" ItemTemplate="{StaticResource PickerItemTemplate}"
                                x:Name="listBox_order" Margin="247,73,0,0" Height="64" Width="180" BorderThickness="1,1,1,1" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="50" />
        <!--TitlePanel 包含应用程序的名称和页标题-->
        <!--ContentPanel - 在此处放置其他内容-->
        <ListBox Grid.Row="1" Width="460"  ScrollViewer.ManipulationMode="Control"   SelectionChanged="ShopList_SelectionChanged"  Name="ShopsList" Margin="0,5,0,0" MouseMove="ShopsList_MouseMove">
                <ListBox.ItemTemplate>
                    <DataTemplate>
						
						<Border x:Name="borderListBox" Margin="7" CornerRadius="3">
                    <Grid>
                        <Grid.RowDefinitions>
							<RowDefinition/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="20*"/>
                            <ColumnDefinition Width="40*"/>
                        </Grid.ColumnDefinitions>
                        
                        <StackPanel Grid.Column="1" Grid.Row="0" Margin="3,0,0,0">
                            <TextBlock Text="{Binding Path=Title}" FontSize="30"  Foreground="Black" >
                            </TextBlock>
                            <!--<local:StarMark Name="AvgStarMark" Marked="{Binding Avg}" MaxStars="5" />-->
                            <TextBlock Name="Scores_TB" Foreground="Gray" Text="{Binding Scores}"></TextBlock>
                            <TextBlock Name="Address_TB"   Foreground="Gray" Text="{Binding Address}"></TextBlock>
                        </StackPanel>

                        <Image Grid.Column="0" Grid.Row="0"  local:LowProfileImageLoader.UriSource="{Binding Logo}" Height="100"/>
                        <toolkit:ContextMenuService.ContextMenu>
                            <toolkit:ContextMenu>
                                <toolkit:MenuItem  Tag="{Binding}"  Header="拨电话" Click="MenuItemPhone_Click"/>
                                <toolkit:MenuItem Header="收藏"  Tag="{Binding}"  Click="MenuItem_Click_2"/>
                            </toolkit:ContextMenu>
                        </toolkit:ContextMenuService.ContextMenu>
                    </Grid>
                        </Border>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
    </Grid>
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Mode="Minimized">
            <shell:ApplicationBarIconButton x:Name="Refresh" IconUri="/images/refresh.png" Text="刷新" Click="Refresh_Click"/>
            <shell:ApplicationBarIconButton IconUri="/images/appbar.add.rest.png" Text="添加" Click="ApplicationBarIconButton_Click" />
            <shell:ApplicationBarIconButton x:Name="Search" IconUri="/images/appbar.feature.search.rest.png" Text="搜索" Click="Search_Click"/>
            <shell:ApplicationBar.MenuItems>
                <!--<shell:ApplicationBarIconButton x:Name="Setting" IconUri="/images/settings.png" Text="设置"/>-->
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>